﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

using RichWebServiceDll;
using System.Management;

namespace ApplicationDemo
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {

            ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_DiskDrive");
            String strHardDiskID = null;
            foreach (ManagementObject mo in searcher.Get())
            {
                strHardDiskID = mo["signature"].ToString().Trim();
                MessageBox.Show(strHardDiskID);
            }
            string strbNumber = string.Empty;
            ManagementObjectSearcher mos = new ManagementObjectSearcher("select * from Win32_baseboard");
            foreach (ManagementObject mo in mos.Get())
            {
                strbNumber = mo["SerialNumber"].ToString();
                MessageBox.Show(strbNumber);
            }
            //try
            //{
            //    System.Management.ManagementObjectSearcher cmicWmi = new ManagementObjectSearcher("SELECT   *   FROM   Win32_DiskDrive ");
            //    System.UInt32 tmpUint32 = 0;
            //    foreach (ManagementObject cmicWmiObj in cmicWmi.Get())
            //    {
            //        tmpUint32 = Convert.ToUInt32(cmicWmiObj["signature "].ToString());
            //    }
            //    this.textBox1.Text = tmpUint32.ToString();
            //    this.gProgressBar1.Value++;
            //}
            //catch (Exception ex1)
            //{
            //    throw new Exception(ex1.ToString());
            //} 
            //net.hnrich.test3.LoginWebSite objlogin = new net.hnrich.test3.LoginWebSite();
             //MessageBox.Show(objlogin.CsLoginValidate("D7GZa9u8xxg=", "EE$thisisarepleaseforaddletter$ZpP$thisisarepleaseforaddletter$8KOE="));
            //RichWebServiceDll.RichWSLogin objLogin = new RichWSLogin("test3.hnrich.net", "admin", "1");
           
            // MessageBox.Show(objLogin.RequestResultMessage);
        }
        
    }
}
